import 'package:flutter/material.dart';
import 'package:netease_music/icons/my_flutter_app_icons.dart';
import 'package:netease_music/theme/custom_colors.dart';

class NavBar extends StatelessWidget {
  const NavBar({super.key});

  @override
  Widget build(BuildContext context) {
    final now = DateTime.now();
    final day = now.day; // 获取当前日
    return SizedBox(
      child: DecoratedBox(
        decoration: BoxDecoration(
          border: Border(
            bottom: BorderSide(
              color: Theme.of(context).extension<CustomColors>()!.borderColor,
              width: 1.0, // 边框宽度
            ),
          ),
        ),
        child: Padding(
          padding: const EdgeInsets.symmetric(
            vertical: 24,
            horizontal: 48,
          ),
          child: Row(
            mainAxisAlignment: MainAxisAlignment.spaceBetween,
            children: [
              Column(
                children: [
                  Container(
                    width: 54,
                    height: 54,
                    decoration: BoxDecoration(
                      borderRadius: BorderRadius.circular(50), // 半径设为宽度/高度的一半
                      border: Border.all(
                        color: Theme.of(context).primaryColor,
                        width: 1.0,
                      ),
                    ),
                    child: Icon(
                      MyFmIcon.myFmIcon,
                      size: 32,
                      color: Theme.of(context).primaryColor,
                    ),
                  ),
                  const SizedBox(
                    height: 6,
                  ),
                  Text(
                    '私人FM',
                    style: Theme.of(context).textTheme.bodyLarge,
                  )
                ],
              ),
              Column(
                children: [
                  Container(
                    width: 54,
                    height: 54,
                    decoration: BoxDecoration(
                      borderRadius: BorderRadius.circular(50), // 半径设为宽度/高度的一半
                      border: Border.all(
                        color: Theme.of(context).primaryColor,
                        width: 1.0,
                      ),
                    ),
                    child: Center(
                      child: Text(
                        '$day',
                        style: TextStyle(
                          color: Theme.of(context).primaryColor,
                          fontSize: 32,
                        ),
                      ),
                    ),
                  ),
                  const SizedBox(
                    height: 6,
                  ),
                  Text(
                    '每日歌曲推荐',
                    style: Theme.of(context).textTheme.bodyLarge,
                  )
                ],
              ),
              Column(
                children: [
                  Container(
                    width: 54,
                    height: 54,
                    decoration: BoxDecoration(
                      borderRadius: BorderRadius.circular(50), // 半径设为宽度/高度的一半
                      border: Border.all(
                        color: Theme.of(context).primaryColor,
                        width: 1.0,
                      ),
                    ),
                    child: Icon(
                      HotList.hotList,
                      size: 32,
                      color: Theme.of(context).primaryColor,
                    ),
                  ),
                  const SizedBox(
                    height: 6,
                  ),
                  Text(
                    '热歌榜',
                    style: Theme.of(context).textTheme.bodyLarge,
                  )
                ],
              )
            ],
          ),
        ),
      ),
    );
  }
}
